﻿namespace Aquarinum.Base.Infrastructure.WebSocket.Interface
{
    /// <summary>
    ///     服务器搜索者
    ///     <remarks>获取连接所在服务器ID，用于向MQ指定的订阅ID的队列发送信息</remarks>
    /// </summary>
    public interface IWebSocketServerSeeker
    {
        /// <summary>
        ///     获取链接所在服务器ID
        /// </summary>
        /// <param name="clientid"></param>
        /// <returns></returns>
        string GetClientConnServer(string clientid);


        /// <summary>
        ///     设置链接与服务器关系
        /// </summary>
        /// <param name="clientid"></param>
        /// <param name="serverid"></param>
        void SetClientConnServerMap(string clientid, string serverid);


        /// <summary>
        ///     移除链接与服务器关系
        /// </summary>
        /// <param name="clientid"></param>
        /// <param name="serverid"></param>
        void RemoveClientConnServerMap(string clientid, string serverid);
    }
}